package com.scalar.chiptrack.operations.dataentry.lotscrap.forms;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.utils.AutoGrowingArrayList;
import com.scalar.chiptrack.operations.dataentry.LotDetails;

import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;


public class ScrapMaterialForm extends ChipTrackActionForm
{
    private String processType;
    private int processStepId;
    private int locationId;
    private int lotId;
    private int scrapReasonCodeId;
    private boolean isNonValueInventory;
    private String baseprocessType;
    ArrayList wipLotsList     = new AutoGrowingArrayList(LotDetails.class);
    ArrayList waferInfoList = new AutoGrowingArrayList(LotDetails.class);

    public String getProcessType()
    {
        return processType;
    }

    public void setProcessType( String processType )
    {
        this.processType = processType;
    }

    public int getProcessStepId()
    {
        return processStepId;
    }

    public void setProcessStepId( int processStepId )
    {
        this.processStepId = processStepId;
    }

    public int getLocationId()
    {
        return locationId;
    }

    public void setLocationId( int locationId )
    {
        this.locationId = locationId;
    }

    public int getLotId()
    {
        return lotId;
    }

    public void setLotId( int lotId )
    {
        this.lotId = lotId;
    }

    public int getScrapReasonCodeId() {
        return scrapReasonCodeId;
    }

    public void setScrapReasonCodeId(int scrapReasonCodeId) {
        this.scrapReasonCodeId = scrapReasonCodeId;
    }

    public ArrayList getWipLotsList() {
        return wipLotsList;
    }

    public void setWipLotsList(ArrayList wipLotsList) {
        this.wipLotsList = wipLotsList;
    }

    public ArrayList getWaferInfoList() {
        return waferInfoList;
    }

    public void setWaferInfoList(ArrayList waferInfoList) {
        this.waferInfoList = waferInfoList;
    }

    public boolean isNonValueInventory() {
        return isNonValueInventory;
    }

    public void setNonValueInventory(boolean nonValueInventory) {
        isNonValueInventory = nonValueInventory;
    }

    public String getBaseprocessType() {
        return baseprocessType;
    }

    public void setBaseprocessType(String baseprocessType) {
        this.baseprocessType = baseprocessType;
    }

    public void reset( ActionMapping mapping, HttpServletRequest request )
	{
       if ( wipLotsList != null )
        {
            int listSize = wipLotsList.size();
            for (int i = 0; i < listSize; i++)
            {
                LotDetails lotDetails = (LotDetails) wipLotsList.get(i);
                lotDetails.setChecked( false );
            }
        }
        isNonValueInventory = false;
	}
}



